package com.originskyseed.platform.cms.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.originskyseed.platform.cms.model.CmsCatalog;

/**
 * 内容目录Mapper类
 *
 * @author LiangMingHui
 */
public interface CmsCatalogMapper {

	/**
	 * deleteByPrimaryKey
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * deleteByPrimaryKeys
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * insert
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(CmsCatalog record) throws Exception;

	/**
	 * insertSelective
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(CmsCatalog record) throws Exception;

	/**
	 * selectByPrimaryKey
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public CmsCatalog selectByPrimaryKey(String id) throws Exception;

	/**
	 * updateByPrimaryKeySelective
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(CmsCatalog record) throws Exception;

	/**
	 * updateByPrimaryKey
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(CmsCatalog record) throws Exception;

	/**
	 * 获取全部消息目录列表
	 *
	 * @return
	 * @throws Exception
	 */
	public List<CmsCatalog> selectAllCmsCatalogs(Map<String, Object> params) throws Exception;

	/**
	 * 分页查询消息目录
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<CmsCatalog> selectListByPage(Map<String, Object> params) throws Exception;

	/**
	 * 查询消息目录
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<CmsCatalog> selectList(Map<String, Object> params) throws Exception;

	/**
	 * 根据code查询目录 *
	 * 
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<CmsCatalog> selectCmsCatalogByCmsCataCode(Map<String, Object> params) throws Exception;

	/**
	 * 是否存在该消息目录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public Boolean existCode(CmsCatalog record) throws Exception;

	/**
	 * 查询三级目录
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<CmsCatalog> selectThirdlevelList(String id) throws Exception;

	/**
	 * 根据父ID查找子类列表
	 * 
	 * @param parentId
	 * @return
	 * @throws Exception
	 */
	List<CmsCatalog> selectByParentId(String parentId) throws Exception;

	/**
	 * 查询商城下一级可用目录（平台、未删、显示）
	 *
	 * @param mallId
	 * @return
	 * @throws Exception
	 */
	public List<CmsCatalog> selectByOneLevelList(@Param("mallId") String mallId) throws Exception;
}